<extend name="Public:base" />
<block name="title"><title>更新角色</title></block>

<block name="script">
	<script type="text/javascript">
		$(document).ready(function(){
			$('#status:checked').parents('label.btn').addClass('active');
		});
	</script>
</block>

<block name="sidebar">
	<include file="Public:sidebar" />
</block>

<block name="content">
	<div id="content" class="col-sm-8">
		<form class="form-horizontal" action="{:U('Role/update')}" method='post'>
			<div class="form-group">
				<label for="name" class="col-sm-2 control-label">角色名称:</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" placeholder="角色名称" name="name" id="name" value="{$vo.name}" />
				</div>
				<label class="col-sm-2 control-label"></label>
			</div>
			<div class="form-group">
				<label for="remark" class="col-sm-2 control-label">角色描述:</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" placeholder="角色描述" name="remark" id="remark" value="{$vo.remark}" />
				</div>
				<label class="col-sm-2 control-label"></label>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">是否启用:</label>
				<div class="btn-group col-sm-5" data-toggle="buttons">
					<label class="btn btn-primary">
						<input type="radio" name="status" id="status" <eq name="vo.status" value="1" >checked="checked"</eq> value="1" />启用
					</label>
					<label class="btn btn-danger">
						<input type="radio" name="status" id="status" <eq name="vo.status" value="0" >checked="checked"</eq> value="0" />禁用
					</label>
				</div>
				<label class="col-sm-2 control-label">
					<input type="hidden" name="id" id="id" value="{$vo.id}" />
				</label>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"></label>
				<div class="col-sm-5">
					<button type="submit" class="btn btn-success btn-add">保存</button>
				</div>
			</div>
		</form>
	</div>
</block>
